package com.db.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.db.common.vo.SysUserDeptVo;
import com.db.pojo.SysUser;

@Mapper
public interface SysUserDao {

	int getRowCount(@Param("username")String username);
	
	List<SysUserDeptVo> findPageObjects(
			@Param("username")String username,
			@Param("startIndex")Integer startIndex,
			@Param("pageSize")Integer pageSize);
	
	int getUserCountByDeptId(Integer deptId);
	
	int validById(
			@Param("id")Integer id,
			@Param("valid")Integer valid,
			@Param("modifiedUser")String modifiedUser);
	
	
	int insertObject(SysUser entity);
	
	SysUserDeptVo findObjectById(Integer id);
	
	int updateObject(SysUser entity);
	
	int updatePassword(
			@Param("password")String password,
			@Param("salt")String salt,
			@Param("id")Integer id);
	
	SysUser findUserByUserName(String username);
}
